# -----------------------------------------------------------------------------
# Copyright (c) 2009 Cross Language Inc., All Rights Reserved.
#
# vendor/menusys
# -----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)

project(menusys)

# Put the libaries and binaries that get built into directories at the
# top of the build tree rather than in hard-to-find leaf directories. 
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)

# -----------------------------------------------------------------------------

add_definitions(-D_UNICODE -DUNICODE)

add_library(menusys STATIC
    menusys.cpp
    ConvertUTF.c
    menusys.h
    menusysu.h
    ConvertUTF.h
    )

CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/menusys.h  ${PROJECT_BINARY_DIR}/include/menusys/menusys.h  COPYONLY)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/menusysu.h ${PROJECT_BINARY_DIR}/include/menusys/menusysu.h COPYONLY)

# -----------------------------------------------------------------------------

include_directories(${PROJECT_BINARY_DIR}/include)
add_executable(testmenusys main.cpp)
target_link_libraries(testmenusys menusys)

